package com.richard.abstractfactory;

public class Client {
    public static void main(String[] args) {
        System.out.println("=========小米系列产品=========");

        //小米工厂
        XiaomiFactory xiaomiFactory = new XiaomiFactory();

        IphoneProduct iphoneProduct = xiaomiFactory.iphoneProduct();
        iphoneProduct.callup();
        iphoneProduct.sendSMS();

        IRouterProduct iRouterProduct = xiaomiFactory.routerProduct();
        iRouterProduct.openWife();
        iRouterProduct.setting();


        System.out.println("=========华为系列产品=========");

        //华为工厂
        HuaweiFactory huaweiFactory = new HuaweiFactory();

        IphoneProduct iphoneProduct1 = huaweiFactory.iphoneProduct();
        iphoneProduct1.callup();
        iphoneProduct1.sendSMS();

        IRouterProduct iRouterProduct2 = huaweiFactory.routerProduct();
        iRouterProduct2.openWife();
        iRouterProduct2.setting();
    }
}
